package request

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
	"time"
)

type ClientUserSearch struct {
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`

	Username string `json:"username" form:"username" `
	Nickname string `json:"nickname" form:"nickname" `
	request.PageInfo
}

// 用户 结构体  ShopUser
type CreateUser struct {
	Username   string `json:"username" form:"username" gorm:"column:username;comment:用户名;" binding:"required"` //用户名
	Password   string `json:"password" form:"password" gorm:"column:password;comment:密码;" binding:"required"`  //密码
	RePassword string `json:"rePassword" form:"rePassword" gorm:"-"`                                           // 确认密码
}

type Login struct {
	Username  string `json:"username"`  // 用户名
	Password  string `json:"password"`  // 密码
	Captcha   string `json:"captcha"`   // 验证码
	CaptchaId string `json:"captchaId"` // 验证码ID
}

type UpdateUser struct {
	global.GVA_MODEL
	Nickname string `json:"nickname" form:"nickname" gorm:"column:nickname;comment:昵称;"` //昵称
	Gender   string `json:"gender" form:"gender" gorm:"column:gender;comment:性别;"`       //性别
	Phone    string `json:"phone" form:"phone" gorm:"column:phone;comment:手机号;"`         //手机号
	Email    string `json:"email" form:"email" gorm:"column:email;comment:邮箱;"`          //邮箱
}
